<template>
  <div>
    <h1>海康威视监控预览</h1>
    <WebRTCPlayer 
      :server-url="webRtcServerUrl"
      :rtsp-url="cameraRtspUrl"
    />
  </div>
</template>

<script>
import WebRTCPlayer from '@/components/WebRTCPlayer.vue';

export default {
  components: {
    WebRTCPlayer
  },
  data() {
    return {
      // webrtc-streamer服务器地址
      webRtcServerUrl: 'http://localhost:8000', 
      // 海康摄像头的实际RTSP地址
      cameraRtspUrl: 'rtsp://admin:password@192.168.1.100:554/Streaming/Channels/101'
    };
  }
};
</script>
 